+2001-04-18 Havoc Pennington <hp@redhat.com>
+
+ Close bug #50615:
+
+ * gtk/gtkstyle.c (gtk_default_draw_layout): Use text_gc to draw
+ the layout
+
+ * gtk/gtktext.c: Use base/text instead of bg/fg throughout
+
+ * gtk/gtkentry.c: Use base/text instead of bg/fg throughout
+
+ * gtk/gtktextdisplay.c: Use base/text instead of bg/fg throughout
+
+ * gtk/gtkstyle.c (gtk_style_init): make GTK_STATE_SELECTED default
+ to blue for base, in addition to bg
+
2001-04-18 Havoc Pennington <hp@redhat.com>
* tests/testgtk.c (create_image): allow shrinking the image window
+2001-04-18 Havoc Pennington <hp@redhat.com>
+
+ Close bug #50615:
+
+ * gtk/gtkstyle.c (gtk_default_draw_layout): Use text_gc to draw
+ the layout
+
+ * gtk/gtktext.c: Use base/text instead of bg/fg throughout
+
+ * gtk/gtkentry.c: Use base/text instead of bg/fg throughout
+
+ * gtk/gtktextdisplay.c: Use base/text instead of bg/fg throughout
+
+ * gtk/gtkstyle.c (gtk_style_init): make GTK_STATE_SELECTED default
+ to blue for base, in addition to bg
+
2001-04-18 Havoc Pennington <hp@redhat.com>
* tests/testgtk.c (create_image): allow shrinking the image window
+2001-04-18 Havoc Pennington <hp@redhat.com>
+
+ Close bug #50615:
+
+ * gtk/gtkstyle.c (gtk_default_draw_layout): Use text_gc to draw
+ the layout
+
+ * gtk/gtktext.c: Use base/text instead of bg/fg throughout
+
+ * gtk/gtkentry.c: Use base/text instead of bg/fg throughout
+
+ * gtk/gtktextdisplay.c: Use base/text instead of bg/fg throughout
+
+ * gtk/gtkstyle.c (gtk_style_init): make GTK_STATE_SELECTED default
+ to blue for base, in addition to bg
+
2001-04-18 Havoc Pennington <hp@redhat.com>
* tests/testgtk.c (create_image): allow shrinking the image window
+2001-04-18 Havoc Pennington <hp@redhat.com>
+
+ Close bug #50615:
+
+ * gtk/gtkstyle.c (gtk_default_draw_layout): Use text_gc to draw
+ the layout
+
+ * gtk/gtktext.c: Use base/text instead of bg/fg throughout
+
+ * gtk/gtkentry.c: Use base/text instead of bg/fg throughout
+
+ * gtk/gtktextdisplay.c: Use base/text instead of bg/fg throughout
+
+ * gtk/gtkstyle.c (gtk_style_init): make GTK_STATE_SELECTED default
+ to blue for base, in addition to bg
+
2001-04-18 Havoc Pennington <hp@redhat.com>
* tests/testgtk.c (create_image): allow shrinking the image window
+2001-04-18 Havoc Pennington <hp@redhat.com>
+
+ Close bug #50615:
+
+ * gtk/gtkstyle.c (gtk_default_draw_layout): Use text_gc to draw
+ the layout
+
+ * gtk/gtktext.c: Use base/text instead of bg/fg throughout
+
+ * gtk/gtkentry.c: Use base/text instead of bg/fg throughout
+
+ * gtk/gtktextdisplay.c: Use base/text instead of bg/fg throughout
+
+ * gtk/gtkstyle.c (gtk_style_init): make GTK_STATE_SELECTED default
+ to blue for base, in addition to bg
+
2001-04-18 Havoc Pennington <hp@redhat.com>
* tests/testgtk.c (create_image): allow shrinking the image window
+2001-04-18 Havoc Pennington <hp@redhat.com>
+
+ Close bug #50615:
+
+ * gtk/gtkstyle.c (gtk_default_draw_layout): Use text_gc to draw
+ the layout
+
+ * gtk/gtktext.c: Use base/text instead of bg/fg throughout
+
+ * gtk/gtkentry.c: Use base/text instead of bg/fg throughout
+
+ * gtk/gtktextdisplay.c: Use base/text instead of bg/fg throughout
+
+ * gtk/gtkstyle.c (gtk_style_init): make GTK_STATE_SELECTED default
+ to blue for base, in addition to bg
+
2001-04-18 Havoc Pennington <hp@redhat.com>
* tests/testgtk.c (create_image): allow shrinking the image window
+2001-04-18 Havoc Pennington <hp@redhat.com>
+
+ Close bug #50615:
+
+ * gtk/gtkstyle.c (gtk_default_draw_layout): Use text_gc to draw
+ the layout
+
+ * gtk/gtktext.c: Use base/text instead of bg/fg throughout
+
+ * gtk/gtkentry.c: Use base/text instead of bg/fg throughout
+
+ * gtk/gtktextdisplay.c: Use base/text instead of bg/fg throughout
+
+ * gtk/gtkstyle.c (gtk_style_init): make GTK_STATE_SELECTED default
+ to blue for base, in addition to bg
+
2001-04-18 Havoc Pennington <hp@redhat.com>
* tests/testgtk.c (create_image): allow shrinking the image window
gdk_gc_set_rgb_fg_color (entry->cursor_gc, cursor_color);
}
else
- entry->cursor_gc = gdk_gc_ref (GTK_WIDGET (entry)->style->bg_gc[GTK_STATE_SELECTED]);
+ entry->cursor_gc = gdk_gc_ref (GTK_WIDGET (entry)->style->base_gc[GTK_STATE_SELECTED]);
}
static void
rect.width = (ranges[2*i + 1] - ranges[2*i]) / PANGO_SCALE;
rect.height = logical_rect.height / PANGO_SCALE;
- gdk_draw_rectangle (entry->text_area, widget->style->bg_gc [GTK_STATE_SELECTED], TRUE,
+ gdk_draw_rectangle (entry->text_area, widget->style->base_gc [GTK_STATE_SELECTED], TRUE,
rect.x, rect.y, rect.width, rect.height);
gdk_region_union_with_rect (clip_region, &rect);
}
- gdk_gc_set_clip_region (widget->style->fg_gc [GTK_STATE_SELECTED], clip_region);
- gdk_draw_layout (entry->text_area, widget->style->fg_gc [GTK_STATE_SELECTED],
+ gdk_gc_set_clip_region (widget->style->text_gc [GTK_STATE_SELECTED], clip_region);
+ gdk_draw_layout (entry->text_area, widget->style->text_gc [GTK_STATE_SELECTED],
x, y,
layout);
- gdk_gc_set_clip_region (widget->style->fg_gc [GTK_STATE_SELECTED], NULL);
+ gdk_gc_set_clip_region (widget->style->text_gc [GTK_STATE_SELECTED], NULL);
gdk_region_destroy (clip_region);
g_free (ranges);
xoffset + strong_x, text_area_height - INNER_BORDER);
if (weak_x != strong_x)
- gdk_draw_line (entry->text_area, widget->style->fg_gc[GTK_STATE_NORMAL],
+ gdk_draw_line (entry->text_area, widget->style->text_gc[GTK_STATE_NORMAL],
xoffset + weak_x, INNER_BORDER,
xoffset + weak_x, text_area_height - INNER_BORDER);
}
style->text[i] = style->fg[i];
style->base[i] = style->white;
}
-
+
+ style->base[GTK_STATE_SELECTED] = gtk_default_selected_bg;
style->base[GTK_STATE_INSENSITIVE] = gtk_default_prelight_bg;
style->text[GTK_STATE_INSENSITIVE] = gtk_default_insensitive_fg;
g_return_if_fail (window != NULL);
if (area)
- gdk_gc_set_clip_rectangle (style->fg_gc[state_type], area);
+ gdk_gc_set_clip_rectangle (style->text_gc[state_type], area);
if (state_type == GTK_STATE_INSENSITIVE)
{
ins = get_insensitive_layout (layout);
- gdk_draw_layout (window, style->fg_gc[state_type], x, y, ins);
+ gdk_draw_layout (window, style->text_gc[state_type], x, y, ins);
g_object_unref (G_OBJECT (ins));
}
else
{
- gdk_draw_layout (window, style->fg_gc[state_type], x, y, layout);
+ gdk_draw_layout (window, style->text_gc[state_type], x, y, layout);
}
if (area)
- gdk_gc_set_clip_rectangle (style->fg_gc[state_type], NULL);
+ gdk_gc_set_clip_rectangle (style->text_gc[state_type], NULL);
}
static void
gc = text->bg_gc;
}
else
- gc = widget->style->bg_gc[widget->state];
+ gc = widget->style->base_gc[widget->state];
gdk_draw_rectangle (GTK_WIDGET (text)->window, gc, TRUE,
area_x, area_y, area_width, area_height);
(mark.index < selection_end_pos))
{
if (old_editable->has_selection)
- fg_gc = GTK_WIDGET(text)->style->fg_gc[GTK_STATE_SELECTED];
+ fg_gc = GTK_WIDGET(text)->style->text_gc[GTK_STATE_SELECTED];
else
- fg_gc = GTK_WIDGET(text)->style->fg_gc[GTK_STATE_ACTIVE];
+ fg_gc = GTK_WIDGET(text)->style->text_gc[GTK_STATE_ACTIVE];
}
else
{
if (selected)
{
- fg_gc = render_state->widget->style->fg_gc[GTK_STATE_SELECTED];
+ fg_gc = render_state->widget->style->text_gc[GTK_STATE_SELECTED];
}
else
{
selection_end_index > line->length + byte_offset) /* All selected */
{
gdk_draw_rectangle (drawable,
- render_state->widget->style->bg_gc[GTK_STATE_SELECTED],
+ render_state->widget->style->base_gc[GTK_STATE_SELECTED],
TRUE,
x + line_display->left_margin,
selection_y,
selection_height,
selection_start_index, selection_end_index);
- gdk_gc_set_clip_region (render_state->widget->style->fg_gc [GTK_STATE_SELECTED], clip_region);
- gdk_gc_set_clip_region (render_state->widget->style->bg_gc [GTK_STATE_SELECTED], clip_region);
+ gdk_gc_set_clip_region (render_state->widget->style->text_gc [GTK_STATE_SELECTED], clip_region);
+ gdk_gc_set_clip_region (render_state->widget->style->base_gc [GTK_STATE_SELECTED], clip_region);
gdk_draw_rectangle (drawable,
- render_state->widget->style->bg_gc[GTK_STATE_SELECTED],
+ render_state->widget->style->base_gc[GTK_STATE_SELECTED],
TRUE,
x + PANGO_PIXELS (line_rect.x),
selection_y,
y + PANGO_PIXELS (baseline),
TRUE);
- gdk_gc_set_clip_region (render_state->widget->style->fg_gc [GTK_STATE_SELECTED], NULL);
- gdk_gc_set_clip_region (render_state->widget->style->bg_gc [GTK_STATE_SELECTED], NULL);
+ gdk_gc_set_clip_region (render_state->widget->style->text_gc [GTK_STATE_SELECTED], NULL);
+ gdk_gc_set_clip_region (render_state->widget->style->base_gc [GTK_STATE_SELECTED], NULL);
gdk_region_destroy (clip_region);
(line_display->direction == GTK_TEXT_DIR_RTL && selection_end_index > byte_offset + line->length)))
{
gdk_draw_rectangle (drawable,
- render_state->widget->style->bg_gc[GTK_STATE_SELECTED],
+ render_state->widget->style->base_gc[GTK_STATE_SELECTED],
TRUE,
x + line_display->left_margin,
selection_y,
PANGO_PIXELS (line_rect.x) - PANGO_PIXELS (line_rect.width);
gdk_draw_rectangle (drawable,
- render_state->widget->style->bg_gc[GTK_STATE_SELECTED],
+ render_state->widget->style->base_gc[GTK_STATE_SELECTED],
TRUE,
x + PANGO_PIXELS (line_rect.x) + PANGO_PIXELS (line_rect.width),
selection_y,
GdkGC *gc;
if (cursor->is_strong)
- gc = widget->style->bg_gc[GTK_STATE_SELECTED];
+ gc = widget->style->base_gc[GTK_STATE_SELECTED];
else
- gc = widget->style->fg_gc[GTK_STATE_NORMAL];
+ gc = widget->style->text_gc[GTK_STATE_NORMAL];
gdk_draw_line (drawable, gc,
line_display->x_offset + cursor->x - x_offset,